import {createRouter, createWebHistory,createWebHashHistory} from 'vue-router'

const router = createRouter({
    history:createWebHistory(),  // 在访问路径前加上h5
    routes:[
        {
            path: '/',
            name: 'Index',
            meta:{
                title:'首页',
                showLoading:1
            },
            redirect:'/global-ad-space',
            component: () => import('@/views/index/index.vue')
        },
        {
            path: '/menu',
            name: 'Menus',
            meta:{
                title:'页面所有链接表',
                showLoading:0
            },
            component: () => import('@/views/menus/index.vue')
        },
        {
            path: '/global-ad-space',
            name: 'GlobalAdSpace',
            meta:{
                title:'全球广告位'
            },
            component: () => import('@/views/ad/global/index.vue')
        },
        {
            path: '/ad',
            name: 'AD',
            meta:{
                title:'广告管理',
                showLoading:0
            },
            redirect:'/ad/ranking',
            component: () => import('@/views/ad/index.vue'),
            children:[
                {
                    path: 'advertiser',
                    name: 'Advertiser',
                    meta:{
                        title:'广告商',
                        showLoading:0
                    },
                    component: () => import('@/views/ad/advertiser/index.vue'),
                },
                {
                    path: 'ranking',
                    name: 'Ranking',
                    meta:{
                        title:'排行榜',
                        showLoading:0
                    },
                    component: () => import('@/views/ad/ranking/index.vue'),
                },
                {
                    path: 'release',
                    name: 'Release',
                    meta:{
                        title:'广告投放',
                        showLoading:0
                    },
                    component: () => import('@/views/ad/release/index.vue'),
                },
                {
                    path: 'setcontent',
                    name: 'setContent',
                    meta:{
                        title:'广告投放内容',
                        showLoading:0
                    },
                    component: () => import('@/views/ad/release/setContent.vue'),
                },
                {
                    path: 'setReward',
                    name: 'setReward',
                    meta:{
                        title:'广告奖励设置',
                        showLoading:0
                    },
                    component: () => import('@/views/ad/release/setReward.vue'),
                },

                {
                    path: 'customer',
                    name: 'customer',
                    meta:{
                        title:'客户管理',
                        showLoading:0
                    },
                    component: () => import('@/views/ad/customer/index.vue'),
                },
                {
                    path: 'fundManage',
                    name: 'FundManage',
                    meta:{
                        title:'资金管理',
                        showLoading:0
                    },
                    component: () => import('@/views/ad/fundManage/index.vue'),
                },
                {
                    path: 'analysis',
                    name: 'Analysis',
                    meta:{
                        title:'投放效果分析',
                        showLoading:0
                    },
                    component: () => import('@/views/ad/analysis/index.vue'),
                },
                {
                    path: 'detail/:id',
                    name: 'detail',
                    meta:{
                        title:'详情',
                        showLoading:0
                    },
                    component: () => import('@/views/ad/global/detail.vue')
                },
                {
                    path: 'detailBottom/:id',
                    name: 'detailBottom',
                    meta:{
                        title:'详情',
                        showLoading:0
                    },
                    component: () => import('@/views/ad/global/detailBottom.vue')
                },
                {
                    path: 'detailProp',
                    name: 'detailProp',
                    meta:{
                        title:'道具详情',
                        showLoading:0
                    },
                    component: () => import('@/views/ad/global/detailProp.vue')
                },
                {
                    path: 'detailCollection',
                    name: 'detailCollection',
                    meta:{
                        title:'藏品详情',
                        showLoading:0
                    },
                    component: () => import('@/views/ad/global/detailCollection.vue')
                },
                {
                    path: 'addCollection',
                    name: 'addCollection',
                    meta:{
                        title:'创建NFT',
                        showLoading:0
                    },
                    component: () => import('@/views/ad/global/addCollection.vue')
                },
                
                {
                    path: 'setUp',
                    name: 'setUp',
                    meta:{
                        title:'设置',
                        showLoading:0
                    },
                    component: () => import('@/views/ad/global/setUp.vue')
                },
                {
                    path: 'usufruct',
                    name: 'usufruct',
                    meta:{
                        title:'收益权转让',
                        showLoading:0
                    },
                    component: () => import('@/views/ad/global/usufruct.vue')
                },
                {
                    path: 'sellDetail/:id',
                    name: 'sellDetail',
                    meta:{
                        title:'详情',
                        showLoading:0
                    },
                    component: () => import('@/views/sell/list/detail.vue')
                }
            ]
        },
        {
            path: '/ad/set',
            name: 'AdSet',
            meta:{
                title:'广告设置',
                showLoading:0
            },
            component: () => import('@/views/ad/set/index.vue')
        },
        {
            path: '/enter',
            name: 'Enter',
            meta:{
                title:'入口',
                showLoading:0
            },
            component: () => import('@/views/enter/index.vue')
        },
        {
            path: '/home',
            name: 'Home',
            meta:{
                title:'我的',
                showLoading:1
            },
            component: () => import('@/views/home/index.vue')
        },
        {
            path: '/shop',
            name: 'Shop',
            meta:{
                title:'店铺',
                showLoading:0
            },
            redirect:'/shop/list',
            component: () => import('@/views/shop/index.vue'),
            children:[
                {
                    path: 'list',
                    name: 'ShopList',
                    meta:{
                        title:'店铺列表',
                        showLoading:1
                    },
                    component: () => import('@/views/shop/list/index.vue')
                },
                {
                    path: 'goods',
                    name: 'ShopGoods',
                    meta:{
                        title:'商铺列表',
                        showLoading:1
                    },
                    component: () => import('@/views/shop/goods/index.vue')
                },
                {
                    path: 'coupons',
                    name: 'Coupons',
                    meta:{
                        title:'商铺优惠价',
                        showLoading:1
                    },
                    component: () => import('@/views/shop/coupons/index.vue')
                }
            ]
        },
        {
            path: '/receive/:id',
            name: 'receive',
            meta:{
                title:'优惠价领取列表',
                showLoading:1
            },
            component: () => import('@/views/shop/coupons/receive.vue')
        },
        {
            path: '/shop/:id',
            name: 'ShopDetail',
            meta:{
                title:'店铺详情',
                showLoading:0
            },
            component: () => import('@/views/shop/detail/index.vue')
        },
        {
            path: '/couponsDetail',
            name: 'couponsDetail',
            meta:{
                title:'优惠券详情',
                showLoading:0
            },
            component: () => import('@/views/shop/detail/couponsDetail.vue')
        },
        {
            path: '/shop/self',
            name: 'ShopSelf',
            meta:{
                title:'自提',
                showLoading:0
            },
            component: () => import('@/views/shop/selfLift-delivery/self.vue')
        },
        {
            path: '/shop/delivery',
            name: 'ShopDelivery',
            meta:{
                title:'送货',
                showLoading:0
            },
            component: () => import('@/views/shop/selfLift-delivery/delivery.vue')
        },
        {
            path: '/goods/:id',
            name: 'goodsDetail',
            meta:{
                title:'商品详情',
                showLoading:1
            },
            component: () => import('@/views/shop/goods/detail/index.vue')
        },
        {
            path: '/ad/space',
            name: 'adSpace',
            meta:{
                title:'广告位',
                showLoading:1
            },
            component: () => import('@/views/ad/space/index.vue')
        },
        {
            path: '/prop',
            name: 'Prop',
            meta:{
                title:'道具',
                showLoading:1
            },
            component: () => import('@/views/prop/index.vue')
        },
        {
            path: '/game',
            name: 'Game',
            meta:{
                title:'游戏',
                showLoading:0
            },
            component: () => import('@/views/game/index.vue')
        },
        {
            path: '/venues',
            name: 'Venues',
            meta:{
                title:'场馆',
                showLoading:0
            },
            component: () => import('@/views/venues/index.vue')
        },
        {
            path: '/capital',
            name: 'Capital',
            meta:{
                title:'收入支出',
                showLoading:0
            },
            redirect:'/capital/income',
            component: () => import('@/views/capital/index.vue'),
            children:[
                {
                    path: 'income',
                    name: 'Income',
                    meta:{
                        title:'收入',
                        showLoading:0
                    },
                    component: () => import('@/views/capital/income/index.vue')
                },
                {
                    path: 'expend',
                    name: 'Expend',
                    meta:{
                        title:'支出',
                        showLoading:0
                    },
                    component: () => import('@/views/capital/expend/index.vue')
                },
                {
                    path: 'ranking',
                    name: 'CapitalRanking',
                    meta:{
                        title:'全网排行',
                        showLoading:0
                    },
                    component: () => import('@/views/capital/ranking/index.vue')
                },
                {
                    path: 'assets',
                    name: 'Assets',
                    meta:{
                        title:'我的资产',
                        showLoading:0
                    },
                    component: () => import('@/views/capital/assets/index.vue')
                }
            ]
        },
        {
            path: '/capital/record',
            name: 'CapitalRecord',
            meta:{
                title:'收支记录',
                showLoading:0
            },
            component: () => import('@/views/capital/record/index.vue')
        },
        {
            path: '/activity/worldcup',
            name: 'WorldcupActivity',
            meta:{
                title:'世界杯活动',
                showLoading:1
            },
            component: () => import('@/views/activity/worldCup/index.vue')
        },
        {
            path: '/worldcup/mycard',
            name: 'MyCard',
            meta:{
                title:'我的卡片',
                showLoading:1
            },
            component: () => import('@/views/activity/worldCup/myCard.vue')
        },
        {
            path: '/sell',
            name: 'Sell',
            meta:{
                title:'售卖',
                showLoading:0
            },
            redirect:'/sell/list',
            component: () => import('@/views/sell/index.vue'),
            children:[
                {
                    path: 'list',
                    name: 'SellList',
                    meta:{
                        title:'售卖',
                        showLoading:1
                    },
                    component: () => import('@/views/sell/list/index.vue')
                },
                {
                    path: 'my',
                    name: 'SellMy',
                    meta:{
                        title:'我的',
                        showLoading:0
                    },
                    component: () => import('@/views/sell/my/index.vue')
                }
            ]
        },
        {
            path: '/collection',
            name: 'Collection',
            meta:{
                title:'藏品',
                showLoading:0
            },
            redirect:'/collection/industry',
            component: () => import('@/views/collection/index.vue'),
            children:[
                {
                    path: 'industry',
                    name: 'CollectionIndustry',
                    meta:{
                        title:'产业NFT',
                        showLoading:1
                    },
                    component: () => import('@/views/collection/industry/index.vue')
                },
                {
                    path: 'number',
                    name: 'CollectionNumber',
                    meta:{
                        title:'数字产品',
                        showLoading:1
                    },
                    component: () => import('@/views/collection/number/index.vue')
                },
                {
                    path: 'other',
                    name: 'CollectionOther',
                    meta:{
                        title:'其他NFT',
                        showLoading:1
                    },
                    component: () => import('@/views/collection/other/index.vue')
                }
            ]
        },
    ]
})

export default router